package zhiweio;

interface Anonymous {
    void description();
}

public class OuterAndAnonymous {
    private String description = "I\'m out";

    private void show(String description) {
        System.out.println(description);
    }

    public void testAnony(Anonymous a) {
        a.description();
    }

    Anonymous a = new Anonymous() {
        @Override
        public void description() {
            description = "I\'m in now";
            show(description);
        }
    };

    public static void main(String[] args) {
        OuterAndAnonymous o = new OuterAndAnonymous();
        o.testAnony(o.a);
    }
}
